using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using Leo.Repository.Mapping;
using Leo.Entities;

namespace Leo.Repository
{
    public partial class VETERINARIALEOContext : DbContext
    {
        static VETERINARIALEOContext()
        {
            Database.SetInitializer<VETERINARIALEOContext>(null);
            //Database.SetInitializer<VETERINARIALEOContext>(new CreateDatabaseIfNotExists<VETERINARIALEOContext>());

        }

        public VETERINARIALEOContext()
            : base("Name=VETERINARIALEOContext")
        {
        }

        public DbSet<Categoria> Categorias { get; set; }
        public DbSet<Cliente> Clientes { get; set; }
        public DbSet<Compra> Compras { get; set; }
        public DbSet<DetalleCompra> DetalleCompras { get; set; }
        public DbSet<DetalleReceta> DetalleRecetas { get; set; }
        public DbSet<DetalleVenta> DetalleVentas { get; set; }
        public DbSet<Empleado> Empleadoes { get; set; }
        public DbSet<Lote> Lotes { get; set; }
        public DbSet<Paciente> Pacientes { get; set; }
        public DbSet<Producto> Productoes { get; set; }
        public DbSet<ProductoProveedor> ProductoProveedors { get; set; }
        public DbSet<Proveedor> Proveedors { get; set; }
        public DbSet<Receta> Recetas { get; set; }
        public DbSet<Rol> Rols { get; set; }
        public DbSet<Servicio> Servicios { get; set; }
        public DbSet<sysdiagram> sysdiagrams { get; set; }
        public DbSet<Venta> Ventas { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new CategoriaMap());
            modelBuilder.Configurations.Add(new ClienteMap());
            modelBuilder.Configurations.Add(new CompraMap());
            modelBuilder.Configurations.Add(new DetalleCompraMap());
            modelBuilder.Configurations.Add(new DetalleRecetaMap());
            modelBuilder.Configurations.Add(new DetalleVentaMap());
            modelBuilder.Configurations.Add(new EmpleadoMap());
            modelBuilder.Configurations.Add(new LoteMap());
            modelBuilder.Configurations.Add(new PacienteMap());
            modelBuilder.Configurations.Add(new ProductoMap());
            modelBuilder.Configurations.Add(new ProductoProveedorMap());
            modelBuilder.Configurations.Add(new ProveedorMap());
            modelBuilder.Configurations.Add(new RecetaMap());
            modelBuilder.Configurations.Add(new RolMap());
            modelBuilder.Configurations.Add(new ServicioMap());
            modelBuilder.Configurations.Add(new sysdiagramMap());
            modelBuilder.Configurations.Add(new VentaMap());
        }
    }
}
